<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        ul{
            background-color: antiquewhite;
        }
    </style>
    <script>
        window.onload = function(){

            var ul = document.getElementById('ul1');
            ul.onclick = function(event){
                if(event.target.className == 'abq'){
                    alert('事件触发！！')
                }
              
            }

            //添加超链接
            document.getElementById('bt1').onclick = function(){
                var li = document.createElement('li');
                li.innerHTML = "<a href = 'javascript:;' class='abq'>新建的标签</a>";
                ul.appendChild(li);
            }
        }
    </script>
</head>
<body>
    <ul id="ul1">
        <p>点击链接</p>
        <button id="bt1">添加超链接</button>
        <li><a href = 'javascript:;' class='abq'>第一个a标签</a></li>
        <li><a href = 'javascript:;' class='abq'>第二个a标签</a></li>
        <li><a href = 'javascript:;' class='abq'>第三个a标签</a></li>
        <li><a href = 'javascript:;' class='abq'>第四个a标签</a></li>
    </ul>
</body>
</html>